package org.appfuse.model;

import java.sql.Date;

/**
 * @struts.form include-all="true" extends="org.appfuse.webapp.form.BaseForm"
 * @hibernate.class table="education"
 */
public class Education extends org.appfuse.model.BaseObject implements
		java.io.Serializable, Comparable {

	// Fields
	private static final long serialVersionUID = 3983901608410972964L;

	private Integer id;

	private BasicInfo basicInfo;

	protected String xl;

	protected String xlbcsm;

	protected Date rxrq;

	protected Date byrq;

	protected String xxmc;

	protected String cxdwlb;

	protected String zymc;

	protected String zylb;

	protected String wcqk;

	protected String jyfs;

	protected String xljb;

	protected String xz;

	protected String xxszzq;

	// Constructors

	public Education(Integer id, BasicInfo basicInfo, String xl, String xlbcsm, Date rxrq, Date byrq, String xxmc, String cxdwlb, String zymc, String zylb, String wcqk, String jyfs, String xljb, String xz, String xxszzq) {
		super();
		this.id = id;
		this.basicInfo = basicInfo;
		this.xl = xl;
		this.xlbcsm = xlbcsm;
		this.rxrq = rxrq;
		this.byrq = byrq;
		this.xxmc = xxmc;
		this.cxdwlb = cxdwlb;
		this.zymc = zymc;
		this.zylb = zylb;
		this.wcqk = wcqk;
		this.jyfs = jyfs;
		this.xljb = xljb;
		this.xz = xz;
		this.xxszzq = xxszzq;
	}

	/** default constructor */
	public Education() {
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public BasicInfo getBasicInfo() {
		return basicInfo;
	}

	public void setBasicInfo(BasicInfo basicInfo) {
		this.basicInfo = basicInfo;
	}

	public Date getRxrq() {
		return this.rxrq;
	}

	public void setRxrq(Date rxrq) {
		this.rxrq = rxrq;
	}

	public Date getByrq() {
		return this.byrq;
	}

	public void setByrq(Date byrq) {
		this.byrq = byrq;
	}

	public String getXz() {
		return this.xz;
	}

	public void setXz(String xz) {
		this.xz = xz;
	}

	public String getXxmc() {
		return this.xxmc;
	}

	public void setXxmc(String xxmc) {
		this.xxmc = xxmc;
	}

	public String getZymc() {
		return this.zymc;
	}

	public void setZymc(String zymc) {
		this.zymc = zymc;
	}

	public String getZylb() {
		return this.zylb;
	}

	public void setZylb(String zylb) {
		this.zylb = zylb;
	}

	public String getWcqk() {
		return this.wcqk;
	}

	public void setWcqk(String wcqk) {
		this.wcqk = wcqk;
	}

	@Override
	public int hashCode() {
		final int PRIME = 31;
		int result = 1;
		result = PRIME * result + ((basicInfo == null) ? 0 : basicInfo.hashCode());
		result = PRIME * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final Education other = (Education) obj;
		if (basicInfo == null) {
			if (other.basicInfo != null)
				return false;
		} else if (!basicInfo.getId().equals(other.basicInfo.getId())){
			return false;
		}
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	
	@Override
	public String toString() {
		return null;
	}

	public String getXl() {
		return xl;
	}

	public void setXl(String xl) {
		this.xl = xl;
	}

	public String getCxdwlb() {
		return cxdwlb;
	}

	public void setCxdwlb(String cxdwlb) {
		this.cxdwlb = cxdwlb;
	}

	public String getJyfs() {
		return jyfs;
	}

	public void setJyfs(String jyfs) {
		this.jyfs = jyfs;
	}

	public String getXlbcsm() {
		return xlbcsm;
	}

	public void setXlbcsm(String xlbcsm) {
		this.xlbcsm = xlbcsm;
	}

	public String getXljb() {
		return xljb;
	}

	public void setXljb(String xljb) {
		this.xljb = xljb;
	}

	public String getXxszzq() {
		return xxszzq;
	}

	public void setXxszzq(String xxszzq) {
		this.xxszzq = xxszzq;
	}

	public int compareTo(Object o) {
		Education theObject = (Education) o;
		return theObject.getXl().compareToIgnoreCase(this.xl);
	}

}